package com.lyz.myself.service.ServiceImpl;

import com.lyz.myself.mapper.RoleMapper;
import com.lyz.myself.pojo.Po.Role;
import com.lyz.myself.service.RoleService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: myself
 * @Date: 2019/2/20 16:38
 * @Author: Mr.Deng
 * @Description:
 */
@Service
public class RoleServicrImpl implements RoleService {

    @Autowired
    RoleMapper roleMapper;
    /**
     *根据position    id查询role_id
     */

    @Override
    public  Role getRole(Integer position_id,Integer company_id){
        return roleMapper.getRole(position_id,company_id);
    }
    /**
     *添加
     * @mbg.generated 2019-01-15
     */
    @Override
    public int insert(Role record){
        return roleMapper.insert(record);
    }

    /**
     *删除关系
     * @mbg.generated 2019-01-15
     */
    @Override
    public int deleteRole(Integer role_id){
        return roleMapper.deleteRole(role_id);
    }
}
